<?php

/*

Process Edit Notice (notices_edit.pro.php)

*/
ob_start();
$rank_check = 1;
include "header.inc.php";

$notice = fetch("SELECT post_message,post_by FROM notices2 WHERE id = '$id' AND game = '$game'");

if (($rank < 4) AND ($notice[post_by] != $username))
{
	die(header(error("notices.php?game=$game","You cannot edit this notice.")));
}

$edit_notice = smilies(badwords(strip_tags($edit_notice,"<b><i><u><br><a><p><img><font><center>")));

mysql_query("UPDATE notices2 SET post_message = '$edit_notice' WHERE id = '$id' AND game = '$game'");

header(error("notices.php?game=$game","Your buddy note has been updated."));

?>